package org.vsg.stock.basic.persistence;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.vsg.stock.basic.domain.BalanceLineKeyPoint;

/**
 * 
 * @author vison
 *
 */
public interface BalanceLineKeypointDao {
	
	/**
	 * 
	 * @param entities
	 * @throws DataAccessException
	 */
	void save(BalanceLineKeyPoint keyPoint) throws DataAccessException;
	
	/**
	 * 
	 * @param stockCode
	 * @return
	 * @throws DataAccessException
	 */
	List<BalanceLineKeyPoint> findByStock(String stockCode ) throws DataAccessException;
	
	/**
	 * 
	 * @param lineId
	 * @param stanPrice
	 * @return
	 * @throws DataAccessException
	 */
	BalanceLineKeyPoint getDifferenceFromCloselyPriceByLineId(String lineId , double diffPrice) throws DataAccessException;
	
	/**
	 * 
	 * @param lineId
	 * @return
	 * @throws DataAccessException
	 */
	double getAveragePriceByLineId(String lineId) throws DataAccessException;
	
}
